package com.blog.cloud.interceptor;


import java.util.List;

import javax.servlet.http.HttpSession;

import com.blog.cloud.comm.modal.dto.MenuDto;
import com.blog.conf.MyConstants;
import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
import com.jfinal.core.Controller;

/**
 * @author lxliufei
 *
 */
public class PageInterceptor  implements Interceptor {
	
	public void intercept(Invocation inv) {
		String url = inv.getActionKey();
		System.out.println(url);
		Controller con = inv.getController();
		HttpSession session = con.getSession();
		
		Object attribute = session.getAttribute("menuSelect");
		
		System.out.println("session"+attribute);
		if(attribute==null ){
			System.out.println("加载menuSelect...");
			session.setAttribute("menuSelect", MyConstants.setMenuList());
		}
		
		
		
		
		
		inv.invoke();
	} 

}

